package ar.edu.utn.frsf.cidisi.upcolbpip.modelgeneration.generator;

import java.util.HashMap;

import ar.edu.utn.frsf.cidisi.upcolbpip.UPColBPIPModel;

public class Experiment {

	private UPColBPIPModel upcolbpipModel;
		
	private int maxNodes;
	private int minNodes;
	private int maxNestingLevel;
	private int minNestingLevel;
	private int maxSequence;
	private int minSequence;
	private int maxInteractionPath;
	private int minInteractionPath;
	private int maxHandlers;
	private int minHandlers;
	private int maxInteractionProtocols;

	private HashMap<Integer,String> elementProbability = new HashMap<Integer,String>();
	
	static public String XOR = "xor";
	static public String AND = "and";
	static public String OR = "or";
	static public String LOOP_WHILE = "loop-while";
	static public String LOOP_UNTIL = "loop-until";
	static public String CANCEL = "cancel";
	static public String EXCEPTION = "exception";
	static public String TERMINATION = "termination";
	static public String MULTIPLE_INSTANCES = "multiple instances";
	static public String BUSINESS_MESSAGE = "business message";
	static public String INTERACTION_PATH = "interaction path";
	
	static public HashMap<Integer,String> FULL_ELEMENTS = new HashMap<Integer,String>(){
		{
			put(1,XOR);
			put(2,AND);
			put(3,OR);
			put(4,LOOP_WHILE);
			put(5,LOOP_UNTIL);
			put(6,CANCEL);
			put(7,EXCEPTION);
			put(8,MULTIPLE_INSTANCES);
//			put(9,BUSINESS_MESSAGE);
			put(9,TERMINATION);
			put(10,BUSINESS_MESSAGE);
		}
	};

	
	static public HashMap<Integer,String> SIMPLE_ELEMENTS = new HashMap<Integer,String>(){
		{
			put(1,XOR);
			put(2,AND);
			put(3,LOOP_WHILE);
			put(4,LOOP_UNTIL);
			put(5,TERMINATION);
			put(6,BUSINESS_MESSAGE);
		}
	};

	static public HashMap<Integer,String> COMPLEX_ELEMENTS = new HashMap<Integer,String>(){
		{
			put(1,OR);
			put(2,CANCEL);
			put(3,EXCEPTION);
			put(4,MULTIPLE_INSTANCES);
			put(5,TERMINATION);
			put(6,BUSINESS_MESSAGE);
		}
	};

	
	public Experiment() {
		
//		minSequence=0; maxSequence=5; 
//		minInteractionPath=2; maxInteractionPath=5;
//		minHandlers=1; maxHandlers=3;
//		minNodes = maxSequence; maxNodes = 150;
//		minNestingLevel = 3; maxNestingLevel=8;
//		maxInteractionProtocols = 1000;
//		
//		
//		
//		elementProbability.put(1,XOR);
//		elementProbability.put(2,AND);
//		elementProbability.put(3,OR);
//		elementProbability.put(4,LOOP_WHILE);
//		elementProbability.put(5,LOOP_UNTIL);
//		elementProbability.put(6,CANCEL);
//		elementProbability.put(7,EXCEPTION);
//		elementProbability.put(8,MULTIPLE_INSTANCES);
//		elementProbability.put(9,TERMINATION);
//		elementProbability.put(10,BUSINESS_MESSAGE);
		
	}
	
	public Experiment(int minNodes, int maxNodes, int minNestingLevel, int maxNestingLevel,
			int minSequence, int maxSequence, int minInteractionPath, int maxInteractionPath,
			int minHandlers, int maxHandlers, int maxInteractionProtocols,
			HashMap<Integer,String> elementProbability){
		
		this.maxNodes = maxNodes;
		this.minNodes = minNodes;
		this.maxNestingLevel = maxNestingLevel;
		this.minNestingLevel = minNestingLevel;
		this.maxSequence = maxSequence;
		this.minSequence = minSequence;
		this.maxInteractionPath = maxInteractionPath;
		this.minInteractionPath = minInteractionPath;
		this.maxHandlers = maxHandlers;
		this.minHandlers = minHandlers;
		this.maxInteractionProtocols = maxInteractionProtocols;
		this.elementProbability = elementProbability;
	}

	
	public UPColBPIPModel getModelUpcolbpip() {
		return upcolbpipModel;
	}


	public int getMaxNodes() {
		return maxNodes;
	}


	public void setMaxNodes(int maxNodes) {
		this.maxNodes = maxNodes;
	}


	public int getMinNodes() {
		return minNodes;
	}


	public void setMinNodes(int minNodes) {
		this.minNodes = minNodes;
	}


	public int getMaxNestingLevel() {
		return maxNestingLevel;
	}


	public void setMaxNestingLevel(int maxNestingLevel) {
		this.maxNestingLevel = maxNestingLevel;
	}


	public int getMinNestingLevel() {
		return minNestingLevel;
	}


	public void setMinNestingLevel(int minNestingLevel) {
		this.minNestingLevel = minNestingLevel;
	}


	public int getMaxSequence() {
		return maxSequence;
	}


	public void setMaxSequence(int maxSequence) {
		this.maxSequence = maxSequence;
	}


	public int getMinSequence() {
		return minSequence;
	}


	public void setMinSequence(int minSequence) {
		this.minSequence = minSequence;
	}


	public int getMaxInteractionPath() {
		return maxInteractionPath;
	}


	public void setMaxInteractionPath(int maxInteractionPath) {
		this.maxInteractionPath = maxInteractionPath;
	}


	public int getMinInteractionPath() {
		return minInteractionPath;
	}


	public void setMinInteractionPath(int minInteractionPath) {
		this.minInteractionPath = minInteractionPath;
	}


	public int getMaxHandlers() {
		return maxHandlers;
	}


	public void setMaxHandlers(int maxHandlers) {
		this.maxHandlers = maxHandlers;
	}


	public int getMinHandlers() {
		return minHandlers;
	}


	public void setMinHandlers(int minHandlers) {
		this.minHandlers = minHandlers;
	}


	public HashMap<Integer, String> getElementProbability() {
		return elementProbability;
	}


	public void setElementProbability(HashMap<Integer, String> elementProbability) {
		this.elementProbability = elementProbability;
	}
	
	
	public int getMaxInteractionProtocols() {
		return maxInteractionProtocols;
	}


	public void setMaxInteractionProtocols(int maxInteractionProtocols) {
		this.maxInteractionProtocols = maxInteractionProtocols;
	}

	
}
